package com.person.jc.web.finance;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Record;
import com.person.jc.service.finance.BuyTicketLogService;
import com.person.jc.utils.DateUtils;
import com.person.jc.utils.Servlets;

public class BuyTicketLogController extends Controller {
	
	public void init(){
		setAttr("menuId", getPara("menuId"));
		setAttr("startDate",DateUtils.formatDate(DateUtils.addMonths(new Date(), -1), "yyyy-MM-dd"));
		
		setAttr("endDate",DateUtils.getDate());
		render("main.jsp");
	}
	
	public void list(){
		Map<String, Object> map = Servlets.getParametersStartingWith(getRequest(), "p_");
		List<Record> list = BuyTicketLogService.me.getList(map);
		setAttr("list", list);
		render("list.jsp");
	}
	
}
